package com.bac.rentmap.ad.publisher;


/**
 * Handles information about ad publishers.
 *
 * @author Andrew Osipenko
 */
public interface AdPublisherService {
    /**
    * Registers that some person identified by <code>phone</code> published new
    * ad.
    *
    * @param phone
    *            required
    * @return new publisher ad count
    */
    int registerNewAd(String phone);

    int unregisterAd(String phone);

    /**
    * Returns ad count which has person identified by <code>phone</code>.
    *
    * @param phone
    *            required
    * @return non negative number of ads
    */
    int getAdCount(String phone);

    /**
    * Clears all information about ad publishers.
    */
    void clear();
}
